package com.cong.方法递归调用;

public class demo01 {
    public static void main(String[] args) {
        System.out.println(sum(50));
    }

    public static int sum(int sun){
        if (sun==1){
            return 1;
        }
        return sun+sum(sun-1);

    }
}
